﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_Role : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void bntEdit_Click(object sender, EventArgs e)
    {
        Label2.Visible = true;
        Label3.Visible = true;
        Label4.Visible = true;
        txtId.Visible = true;
        txtName.Visible = true;
        btnEdit1.Visible = true;
    }
    protected void btnEdit1_Click(object sender, EventArgs e)
    {
        SqlDataSource1.Update();
    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/Admin/Add_role.aspx");
    }
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
        txtId.Text = HttpUtility.HtmlDecode(GridView1.Rows[GridView1.SelectedIndex].Cells[1].Text);
        txtName.Text = HttpUtility.HtmlDecode(GridView1.Rows[GridView1.SelectedIndex].Cells[2].Text);
    }
}
